package cn.com.code.design;

/**
 * 懒汉式 非线程安全
 * @author zhengpei
 * @date 2021/9/17
 */
public class Singleton01 {

  private static Singleton01 instance;

  private Singleton01() {
  }

  public static Singleton01 getInstance(){
    if (null != instance){
      return instance;
    }
    return new Singleton01();
  }

}
